package cn.tedu.serviceEdu.controller;

import cn.tedu.commonUtils.R;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;

@RestController
@CrossOrigin
@RequestMapping("/eduservice/user")
public class EduLoginController {

    @PostMapping("/login")
    public R login(){
        return R.ok().data("token","admin");
    }

    @GetMapping("/info")
    public R getInfo(){
        HashMap<String, Object> map = new HashMap<>();
        map.put("roles","[admin]");
        map.put("name","admin");
        map.put("avtar","https://edu-douluodalu.oss-cn-beijing.aliyuncs.com/admin/1550895514.jpeg");
        return R.ok().data(map);
    }
}
